package cn.langpy.recall.common;

public class KnownRecord {
    private String userId = "";
    private MessageRole role = MessageRole.KNOWLEDGE;
    private String memorySpace;
    private String question;
    private String answer;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public MessageRole getRole() {
        return role;
    }

    public void setRole(MessageRole role) {
        this.role = role;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getMemorySpace() {
        return memorySpace;
    }

    public void setMemorySpace(String space) {
        this.memorySpace = space;
    }

    public static KnownRecordBuilder builder() {
        return new KnownRecordBuilder();
    }

    public static class KnownRecordBuilder {
        private KnownRecord chatRecord;

        public KnownRecordBuilder() {
            chatRecord = new KnownRecord();
        }

        public KnownRecord build() {
            return chatRecord;
        }

        public KnownRecordBuilder userId(String userId) {
            this.chatRecord.setUserId(userId);
            return this;
        }


        public KnownRecordBuilder role(MessageRole role) {
            this.chatRecord.setRole(role);
            return this;
        }

        public KnownRecordBuilder question(String message) {
            this.chatRecord.setQuestion(message);
            return this;
        }

        public KnownRecordBuilder answer(String message) {
            this.chatRecord.setAnswer(message);
            return this;
        }
        public KnownRecordBuilder memorySpace(String space) {
            this.chatRecord.setMemorySpace(space);
            return this;
        }
    }

}
